package com.okami.rabbit;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author: TanJingyu
 * @create: 2021-01-26 10:57
 **/
@Component
@RabbitListener(queues = "lihai")
public class Handler {

    @RabbitHandler
    public void handleString(byte[] message) {
        System.out.println(new String(message));
    }
}
